constraint layout: Use stronger force for min size
authorMatthias Clasen <mclasen@redhat.com>
Sat, 29 Jun 2019 22:20:20 +0000 (22:20 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 1 Jul 2019 01:49:20 +0000 (01:49 +0000)
We want our edit constraint to be strong enough to
overpower nat. size constraint, therefore use STRONG * 2.

gtk/gtkconstraintlayout.c

index 18bb98f788d935a0100146225c1d018b6c5dcda5..4339630c21e036dcd807a902bb3f38973a291f40 100644 (file)
@@ -791,9 +791,9 @@ gtk_constraint_layout_measure (GtkLayoutManager *manager,
    * natural state of the system. Once we get the value out, we can
    * remove these constraints
    */
-  gtk_constraint_solver_add_edit_variable (solver, size, GTK_CONSTRAINT_WEIGHT_STRONG);
+  gtk_constraint_solver_add_edit_variable (solver, size, GTK_CONSTRAINT_WEIGHT_STRONG * 2);
   if (for_size > 0)
-    gtk_constraint_solver_add_edit_variable (solver, opposite_size, GTK_CONSTRAINT_WEIGHT_STRONG);
+    gtk_constraint_solver_add_edit_variable (solver, opposite_size, GTK_CONSTRAINT_WEIGHT_STRONG * 2);
   gtk_constraint_solver_begin_edit (solver);
   gtk_constraint_solver_suggest_value (solver, size, 0.0);
   if (for_size > 0)